home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
language
/
embedded
/
mcu11
/
examples.arc
/
EX11TEXT
< prev
next >
Wrap
Text File
|
1988-11-29
|
864b
|
24 lines
* Program segments - not intended for assembly as is.
LDAA #100 Hex ($64)
NEGA 2's compliment ($9C)
STAA PACNT Store to pulse accum counter
LDD #515 Get desired count in A:B
TSTB Test for remainder count
BEQ ARNINC If none; skip the INCA
INCA Increment the overflow count
ARNINC NEGB 2's compliment remainder in B
STAB PACNT Store to pulse accum counter
STAA OVCNT Store to RAM overflow variable
LDD #515 Get desired count in A:B
NEGB C-bit only cleared if B was 0
BCC ARNINC If B was ($00); skip the INCA
INCA Increment the overflow count
ARNINC STAB PACNT Store 2's comp. remainder count
STAA OVCNT Store to RAM overflow variable